package todolist.test;

import todolist.activities.EditActivity;
import todolist.activities.TodoList;
import android.test.ActivityInstrumentationTestCase2;
import android.view.KeyEvent;
import android.widget.TextView;

public class JUnitEditScreenActivity extends ActivityInstrumentationTestCase2<EditActivity>{
	private EditActivity mActivity;  // the activity under test
    TodoList context;
    TextView dateText;
    
    public JUnitEditScreenActivity() {
      super("todolist.activities", EditActivity.class);
    }
    @Override
    protected void setUp() throws Exception {
        super.setUp();
        mActivity = this.getActivity();
        //dateText = (TextView) mActivity.findViewById(todolist.activities.R.id.dateText);
        
      //  context = ((TodoList) mActivity.getApplicationContext());

    }
    public void testPreconditions() {
      assertNotNull(mActivity);
    }
    
    /*
     * These tests achieve branch coverage for the updateDisplay method in the edit screen.
     */
	public void testUpdateDisplay() {
		//mActivity.mDay=22;
		//mActivity.updateDisplay();
		assertTrue(dateText.getText().toString().compareTo("4-22-2012")==0);
	}
	 

}
